<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserInfoBusinTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_info_busin', function (Blueprint $table) {
            $table->increments('id');
            $table->string('mobile',20)->comment('用户号码');
            $table->string('user_name',20)->comment('用户名');
            $table->string('nick_name',20)->comment('昵称');
            $table->string('avatar',200)->comment('头像地址');
            $table->string('pay_password',128)->comment('支付密码');
            $table->string('open_id',100)->comment('微信的open_id');
            $table->string('identity_card',20)->comment('身份证');
            $table->string('real_name',20)->comment('真实姓名');
            $table->date('birthday',20)->comment('用户生日');
            $table->date('sex',2)->default(-1)->comment('性别,1男0女-1保密');
            $table->decimal('balance',16,2)->default(0.00)->comment('余额');
            $table->decimal('save_money',16,2)->default(0.00)->comment('节省金额');
            $table->decimal('point',16,0)->default(0)->comment('积分余额');
            $table->string('city',20)->comment('常驻城市');
            $table->integer('is_use_password',4)->default(0)->comment('是否使用支付密码（1：使用，0：不使用）');
            $table->integer('status',4)->default(1)->comment('账号状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('user_info_busin');
    }
}
